<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>

<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<jsp:include page="/core/tool/resources.jsp"></jsp:include>
	<script src="./role.js"></script>

</head>

<body class="easyui-layout" style="text-align:left">

	<div data-options="region:'west',split:true" style="width:400px">
		<div id="toolbar">
		   <a href="#" class="easyui-linkbutton" iconCls="icon-add" onclick="javascript:$('#dg').edatagrid('addRow')">新增</a>
		   <a href="#" class="easyui-linkbutton" iconCls="icon-reload" onclick="javascript:$('#dg').edatagrid('reload')">刷新</a>
	       <a href="#" class="easyui-linkbutton" iconCls="icon-remove" onclick="javascript:$('#dg').edatagrid('destroyRow')">删除</a>
	       <a href="#" class="easyui-linkbutton" iconCls="icon-undo" onclick="javascript:$('#dg').edatagrid('cancelRow')">取消</a>
		</div>
		<table id="dg"  class="easyui-edatagrid"  title="角色列表" toolbar="#toolbar" style="margin-top:20px"
            data-options="rownumbers:true,singleSelect:true, editing:true, sortOrder:'desc', sortName:'roleCode', 
	           	onClickRow:clickRole,
	            url:'./getrole.json', destroyUrl:'./deleterole.json',
	            autoSave:true, 
	            saveUrl:'./saverole.json', updateUrl:'./saverole.json'">
	        <thead>
	            <tr>
	                <th data-options="field:'roleCode',width:100, sortable:true, editor:'textbox'">角色编码</th>
	                <th data-options="field:'roleName',width:250, editor:'textbox'">角色名</th>
	            </tr>
	        </thead>
	    </table>
	</div>

	<div data-options="region:'center',border:false" >
	 	<a href="#" class="easyui-linkbutton" iconCls='icon-save' onclick="click_save()" >保存</a>
		<ul id="tt" class="easyui-tree"  data-options="animate:true,checkbox:true"></ul>
	</div>
</body>
</html>
